#include "chassis_control.h"

Chassis_control_e Chassis_mode = CHASSIS_INIT;

extern Motor_t Motor1, Motor2;

void Chassis_control(Chassis_control_e Chassis_mode)
{
    switch (Chassis_mode)
    {
    case CHASSIS_INIT:
        Motor_Sleep(&Motor1,&Motor2);
        break;
    
    case CHASSIS_AHEAD:
        Motor_Ahead(&Motor1,&Motor2);
        break;

    case CHASSIS_BACK:
        Motor_Back(&Motor1,&Motor2);

    case CHASSIS_TURN_LEFT:
        Motor_Turn_Left(&Motor1,&Motor2);
        break;

    case CHASSIS_TURN_RIGHT:
        Motor_Turn_Right(&Motor1,&Motor2);
        break;

    case CHASSIS_STOP:
        Motor_Stop(&Motor1,&Motor2);
        break;
               
    default:
        break;
    }

}


